# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: James An <james@jamesan.ca>
# Contributor: Daniel Nagy <danielnagy at gmx de>

pkgname=libde265
pkgver=1.0.8
pkgrel=1
pkgdesc="Open h.265 video codec implementation"
arch=(x86_64)
url="https://github.com/strukturag/libde265"
license=(LGPL3)
depends=(gcc-libs)
makedepends=(ffmpeg sdl qt5-base)
optdepends=('ffmpeg: for sherlock265' 'qt5-base: for sherlock265'
            'sdl: dec265 YUV overlay output')
source=(https://github.com/strukturag/libde265/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz)
sha256sums=('24c791dd334fa521762320ff54f0febfd3c09fc978880a8c5fbc40a88f21d905')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --enable-static=no
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install

# Remove useless tests binary
  rm "$pkgdir"/usr/bin/tests
}
